package dp.subsequence;

import java.util.Arrays;

//674. 最长连续递增序列
public class Num674_findLengthOfLCIS {
        public int findLengthOfLCIS(int[] nums) {
            if (nums.length <= 1)return nums.length;
            int res = 0;
        int []dp = new int[nums.length];
        Arrays.fill(dp , 1);
            for (int i = 1; i < nums.length; i++) {
                if (nums[i] > nums[i - 1]){
                    dp[i] = dp[i - 1] + 1;
                }
                res = Math.max(dp[i] , res);
            }
            return res;
        }

}
